<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数据管理</title>
    <meta name="viewport" content="width=device-width,user-scalable=no, initial-scale=1">
    <link rel="stylesheet" href="/static/component/pear/css/pear.css"/>
    <link rel="stylesheet" href="/static/component/markdown/editor/editormd.min.css" />
    <script src="/static/component/layui/layui.js"></script>
    <script src="/static/component/pear/pear.js"></script>
    <script src="/static/component/pear/module/ruinuo/sortable.js"></script>
    <script src="/static/component/pear/module/ruinuo/xm-select.js"></script>
</head>
<body>

<div class="view_body"></div>
<script type="text/html" id="view_body_data">
    <form class="layui-form" action="">
        <div class="mainBox ruinuo_box {{= form_config.form_label}}">
            <div class="main-container layui-row layui-col-space10 label_con">
                <fieldset class="design-box layui-elem-field layui-field-title layui-col-xs12"><legend class="tips_legend">基础设置</legend></fieldset>
<div class="design-box layui-col-xs12 layui-col-md4 name_box {{#  if(layui.engine_form.PowerField('name')==1){ }}form_disabled{{#  } }}">
<label class="layui-form-label layui-form-item-required">表名</label>
<div class="layui-input-block " data_tag="input" data_source="">
<input  name="name" id="focus_241c_1713774796744_30488" type="text" lay-tag="input" autocomplete="off"  value="{{= d.detail.name}}" class="layui-input">
</div>
</div>
<div class="design-box layui-col-xs12 layui-col-md4 comment_box {{#  if(layui.engine_form.PowerField('comment')==1){ }}form_disabled{{#  } }}">
<label class="layui-form-label layui-form-item-required">注释</label>
<div class="layui-input-block " data_tag="input" data_source="">
<input  name="comment" id="focus_1bf6_1713774801440_56663" type="text" lay-tag="input" autocomplete="off"  value="{{= d.detail.comment}}" class="layui-input">
</div>
</div>
<div class="design-box layui-col-xs12 layui-col-md4 engine_box {{#  if(layui.engine_form.PowerField('engine')==1){ }}form_disabled{{#  } }}">
<label class="layui-form-label layui-form-item-required">引擎</label>
<div class="layui-input-block " data_tag="select" data_source="database_engine">
<select name="engine" lay-filter="select_filter" lay-search=""><option value="">请选择</option>
{{- layui.engine_form.SelectOption(d.source.database_engine.rows,d.detail.engine)}}</select>
</div>
</div>
<div class="design-box layui-col-xs12 layui-col-md4 collation_box {{#  if(layui.engine_form.PowerField('collation')==1){ }}form_disabled{{#  } }}">
<label class="layui-form-label layui-form-item-required">字符集</label>
<div class="layui-input-block " data_tag="select" data_source="database_collation">
<select name="collation" lay-filter="select_filter" lay-search=""><option value="">请选择</option>
{{- layui.engine_form.SelectOption(d.source.database_collation.rows,d.detail.collation)}}</select>
</div>
</div>
<div class="design-box layui-col-xs12 layui-col-md4 delete_type_box {{#  if(layui.engine_form.PowerField('delete_type')==1){ }}form_disabled{{#  } }}">
<label class="layui-form-label layui-form-item-required">删除方式</label>
<div class="layui-input-block " data_tag="select" data_source="delete_type">
<select name="delete_type" lay-filter="select_filter" lay-search=""><option value="">请选择</option>
{{- layui.engine_form.SelectOption(d.source.delete_type.rows,d.detail.delete_type)}}</select>
</div>
</div>
<div class="design-box layui-col-xs12 layui-col-md4 del_log_box {{#  if(layui.engine_form.PowerField('del_log')==1){ }}form_disabled{{#  } }}">
<label class="layui-form-label layui-form-item-required">删除日志</label>
<div class="layui-input-block " data_tag="select" data_source="yesno">
<select name="del_log" lay-filter="select_filter" lay-search=""><option value="">请选择</option>
{{- layui.engine_form.SelectOption(d.source.yesno.rows,d.detail.del_log)}}</select>
</div>
</div>
<div class="design-box layui-col-xs12 layui-col-md12 ruinuo_yes_none old_name_box {{#  if(layui.engine_form.PowerField('old_name')==1){ }}form_disabled{{#  } }} form_disabled">
<label class="layui-form-label">旧表名</label>
<div class="layui-input-block " data_tag="input" data_source="">
<input  name="old_name" id="focus_6ddd_1714008067744_79404" type="text" readonly lay-tag="input" autocomplete="off"  value="{{= d.detail.old_name}}" class="layui-input">
</div>
</div>
<fieldset class="design-box layui-elem-field layui-field-title layui-col-xs12"><legend class="tips_legend">字段设置</legend></fieldset>
<blockquote class="design-box layui-elem-quote tips_legend layui-col-xs12">系统默认字段无需创建：id(主键)，create_time(新增时间)，create_id(新增用户ID)，update_time(更新时间)，update_id(更新用户ID)，tenant_id(租户ID)，is_delete(删除标记)</blockquote>
<div class="design-box layui-col-xs12 layui-col-md12 field_box {{#  if(layui.engine_form.PowerField('field')==1){ }}form_disabled{{#  } }}">
<div class="layui-input-block  block_margin_left_0" data_tag="jsontable" data_source="">
<textarea name="field" id="focus_59fd_1713774900755_02838" class="layui-input" style="display: none"  lay-filter="json_filter">{{= d.detail.field}}</textarea>
<div class="table_59fd_1713774900755_02838 f_table">
<table id="table_59fd_1713774900755_02838" lay-filter="filter_59fd_1713774900755_02838"></table>
</div>
</div>
</div>

            </div>
        </div>
        <div class="bottom">
            <div class="ruinuo-button-con">
                <button type="button" class="pear-btn pear-btn-primary" onclick="SendForm()">
                    <i class="layui-icon layui-icon-ok"></i>提交
                </button>
                <button type="reset" class="pear-btn">
                    <i class="layui-icon layui-icon-refresh"></i>重置
                </button>
            </div>
        </div>
    </form>
</script>
<script>

    function FormBind()
    {
        let tablefield={"col":"12","tag":"jsontable","cols":[{"field":"field","title":"字段名","update":"input","verify":"isalphaAndDash","required":1,"minWidth":160},{"field":"title","title":"注释","update":"input","required":1,"minWidth":160},{"field":"type","title":"字段类型","update":"select","options":"database_field_type","required":1,"minWidth":160},{"field":"length","title":"长度","update":"input","minWidth":160},{"field":"default","title":"默认值","update":"input","minWidth":160},{"field":"key","title":"索引","update":"switch","minWidth":160}],"help":"","hide":"2","field":"field","title":"字段","value":"","elem_id":"59fd_1713774900755_02838","required":"2","hide_label":"1"};
layui.engine_form.BindJsonTable(tablefield);

    }
</script>
<script src="/static/js/ruinuo/database/config.js?t={:time()}"></script>
<script src="/static/component/markdown/editor/editormd.min.js"></script>
<script src="/static/component/markdown/editor/marked.min.js"></script>
<script src="/static/js/ruinuo/database/form.js?t={:time()}"></script>
<script src="/static/component/pear/module/jQuery.print.js"></script>
</body>
</html>